;Assembler header file for ZapFontMenu
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:11:43 2005
;Christian Ludlam, <chris@recoil.org>, 22-Apr-05

        [       :LNOT: :DEF: ZapFontMenu_Hdr
        GBLS    ZapFontMenu_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_Toolbox
        GBLS    Get_Toolbox
        ]
        [       :LNOT: :DEF: Toolbox_Hdr
Get_Toolbox                     SETS    "GET oslib/Toolbox.Hdr"
        |
Get_Toolbox                     SETS    ""
        ]
        $Get_Toolbox

        [       :LNOT: :DEF: Get_Menu
        GBLS    Get_Menu
        ]
        [       :LNOT: :DEF: Menu_Hdr
Get_Menu                        SETS    "GET oslib/Menu.Hdr"
        |
Get_Menu                        SETS    ""
        ]
        $Get_Menu

;Symbols for constants
Class_ZapFontMenu               *       &100300
ZapFontMenu_GenerateAboutToBeShown *       &1
ZapFontMenu_GenerateHasBeenHidden *       &2
ZapFontMenu_IncludeSystemFont   *       &4
ZapFontMenu_EncodingMenu        *       &8
ZapFontMenu_EncodingSelection   *       &1
Action_ZapFontMenuAboutToBeShown *       &100300
Action_ZapFontMenuHasBeenHidden *       &100301
Action_ZapFontMenuSelection     *       &100302
Error_ZapFontMenuTasksActive    *       &81D440
Error_ZapFontMenuAllocFailed    *       &81D441
Error_ZapFontMenuShortBuffer    *       &81D442
Error_ZapFontMenuNoSuchTask     *       &81D443
Error_ZapFontMenuNoSuchMethod   *       &81D444
Error_ZapFontMenuNoSuchMiscOpMethod *       &81D445

;Symbols for structure offsets and sizes
                                ^       0
                                #       Bits
ZapFontMenu_Flags               *       @

                                ^       0
ZapFontMenu_Object_flags        #       ZapFontMenu_Flags
ZapFontMenu_Object_ticked_font  #       Toolbox_StringReference
ZapFontMenu_Object              *       @

                                ^       0
ZapFontMenu_ObjectTemplate      Toolbox_ResourceFileObject_MEMBERS
ZapFontMenu_ObjectTemplate_objectflags #       ZapFontMenu_Flags
ZapFontMenu_ObjectTemplate_ticked_font #       Toolbox_StringReference
ZapFontMenu_ObjectTemplate      *       @

ZapFontMenu_Full                *       OS_Coord

                                ^       0
ZapFontMenu_ActionAboutToBeShown_tag #       Toolbox_PositionTag
ZapFontMenu_ActionAboutToBeShown_position *       @
ZapFontMenu_ActionAboutToBeShown_position_top_left #       OS_Coord
                                ^       ZapFontMenu_ActionAboutToBeShown_position
ZapFontMenu_ActionAboutToBeShown_position_full #       ZapFontMenu_Full
ZapFontMenu_ActionAboutToBeShown *       @

                                ^       0
ZapFontMenu_ActionAboutToBeShownBlock Toolbox_ActionHeader_MEMBERS
ZapFontMenu_ActionAboutToBeShownBlock_tag #       Toolbox_PositionTag
ZapFontMenu_ActionAboutToBeShownBlock_position *       @
ZapFontMenu_ActionAboutToBeShownBlock_position_top_left #       OS_Coord
                                ^       ZapFontMenu_ActionAboutToBeShownBlock_position
ZapFontMenu_ActionAboutToBeShownBlock_position_full #       ZapFontMenu_Full
ZapFontMenu_ActionAboutToBeShownBlock *       @

ZapFontMenu_ActionHasBeenHiddenBlock *       Toolbox_ActionHeaderBase

ZapFontMenu_ActionDialogueCompletedBlock *       Toolbox_ActionHeaderBase

                                ^       0
ZapFontMenu_ActionSelection_identifier #       212*Char
ZapFontMenu_ActionSelection     *       @

                                ^       0
ZapFontMenu_ActionSelectionBlock Toolbox_ActionHeader_MEMBERS
ZapFontMenu_ActionSelectionBlock_identifier #       212*Char
ZapFontMenu_ActionSelectionBlock *       @


;Symbols for SWI's and SWI reason codes
XZapFontMenu_ClassSWI           *       &120300
ZapFontMenu_ClassSWI            *       &100300

XZapFontMenu_PostFilter         *       &120301
ZapFontMenu_PostFilter          *       &100301

XZapFontMenu_PreFilter          *       &120302
ZapFontMenu_PreFilter           *       &100302

ZapFontMenu_SetFont             *       &0
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = font_menu (Toolbox_O)
   ;  R2 = &0
   ;  R3 -> font_identifier (String)

ZapFontMenu_GetFont             *       &1
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = font_menu (Toolbox_O)
   ;  R2 = &1
   ;  R3 = buffer (pointer to String)
   ;  R4 = size (Int)
   ;Exit
   ;  R4 = used (Int)

ZapFontMenu_SetSystemAvailable  *       &2
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = font_menu (Toolbox_O)
   ;  R2 = &2
   ;  R3 = available (Bool)

ZapFontMenu_GetSystemAvailable  *       &3
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = font_menu (Toolbox_O)
   ;  R2 = &3
   ;Exit
   ;  R0 = available (Bool)

        ]
        END
